import javafx.scene.shape.DrawMode;

class Shape {
    public void draw() {
        System.out.println("画图形");
    }
}

class Cycle extends Shape {
    @Override
    public void draw() {
        System.out.println("画一个圆形");
    }
}

class Rect extends Shape {
    @Override
    public void draw() {
        System.out.println("画一个矩形");
    }
}

class Triangle extends Shape {
    @Override
    public void draw() {
        System.out.println("画一个三角形");
    }
}


public class Main {
    public static void main(String[] args) {
        Cycle C = new Cycle();
        Rect R = new Rect();
        Triangle T =new Triangle();

        Shape[] S ={C,T,R,T,C};
        for(Shape s : S) {
            s.draw();
        }
    }
}